package tr.edu.yildiz.ce.app_manager.ui.action.table;

import com.vaadin.ui.Table;

import tr.edu.yildiz.ce.app_manager.model.AppProxy;
import tr.edu.yildiz.ce.app_manager.model.Application;
import tr.edu.yildiz.ce.app_manager.ui.AppManagerApplication;
import tr.edu.yildiz.ce.app_manager.ui.components.form.ApplicationForm;
import tr.edu.yildiz.ce.app_manager.ui.components.form.ProxyForm;

public class ApplicationTableSelectAction extends TableAction{

	Long id;
	Application application ;
	
	public Application getApplication(){
		return application;
	}
	
	public ApplicationTableSelectAction(AppManagerApplication app,Long id) {
		super(app);
		this.id = id;
	}

	@Override
	public void doAction() {
		application = app.getServiceProvider().getApplicationService().get(id);
		ApplicationForm form = new ApplicationForm(application,app);
		app.getMainLayout().setForm(form);
		
	}

}
